<template>
  <div class="module1">
    <div class="module1-head">通知公告</div>
    <div class="module1-content">
      <vue3ScrollSeamless
        class="scroll-wrap"
        :classOptions="classOptions"
        :dataList="data"
      >
        <ul class="ui-wrap">
          <li class="li-item" v-for="(item, i) of data" :key="i">
            <p>{{ item.noticeTitle }}</p>
          </li>
        </ul>
      </vue3ScrollSeamless>
    </div>
  </div>
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
import { vue3ScrollSeamless } from 'vue3-scroll-seamless'
import { getNoticeList } from '@/api/index.js'

const scroll = ref(true)
const classOptions = {
  singleHeight: 34
}
const data = ref([])
onMounted(() => {
  getNoticeList({
    pageNum: 1,
    pageSize: 100
  })
    .then((res) => {
      if (res.code === 200) {
        data.value = res.rows
      }
    })
    .catch((err) => console.log('err', err))
})
</script>
<style scoped lang="scss">
.module1 {
  width: 100%;
  height: 100%;
  padding-top: 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  .module1-head {
    width: 100%;
    max-width: 405px;
    height: 33px;
    background: url('@/assets/img/card-head.png') no-repeat center;
    background-size: 100% 100%;
    font-family: FZZYJW;
    font-weight: normal;
    font-size: 20px;
    color: #c3ff55;
    line-height: 24px;
    padding-left: 42px;
  }
  .module1-content {
    flex: 1;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    .scroll-wrap {
      width: 100%;
      height: 100%;
      overflow: hidden;
      margin: 0 auto;
    }
  }
  .ui-wrap {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    .li-item {
      font-family: Source Han Sans CN;
      height: 34px;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      font-weight: 400;
      font-size: 14px;
      color: #ffffff;
    }
    & > li:nth-child(2n) {
      background: rgba(0, 79, 95, 0.3);
    }
  }
}
</style>
